Loading libraries
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library (dplyr)
library (patchwork)
library (ggplot2)
library (knitr)
library ("quarto" )
library (here)
here() starts at /home/people/s243903/projects/project_r4bd
library (broom)
library (cowplot)
Attaching package: 'cowplot'
The following object is masked from 'package:patchwork':
align_plots
The following object is masked from 'package:lubridate':
stamp
library (ggrepel)
library (readr)
library (stringr)
Create results folder if non exisisting
# Create results folder if non-existing
if (! dir.exists ("../results" )) {
dir.create ("../results" )
}
We will use quarto::render
Loading data
# Render the other .qmd files
quarto:: quarto_render ("../R/01_load.qmd" )
[31m
processing file: 01_load.qmd
[39m
|
| | 0%
|
|.......... | 20%
|
|..................... | 40% [unnamed-chunk-1]
|
|............................... | 60%
|
|.......................................... | 80% [unnamed-chunk-2][31mtrying URL 'https://archive.ics.uci.edu/static/public/383/cervical+cancer+risk+factors.zip'
[39m[31mdownloaded 99 KB
[39m
|
|....................................................| 100%
[31moutput file: 01_load.knit.md
[39m[1mpandoc [22m
to: html
output-file: 01_load.html
standalone: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 01_load
editor: visual
Output created: 01_load.html
#move to results
file.rename (here ("R/01_load.html" ), here ("results/01_load.html" ))
clean data
quarto:: quarto_render ("../R/02_clean.qmd" )
[31m
processing file: 02_clean.qmd
[39m
|
| | 0%
|
|... | 7%
|
|....... | 13% [unnamed-chunk-1]
|
|.......... | 20%
|
|.............. | 27% [unnamed-chunk-2]
|
|................. | 33%
|
|..................... | 40% [unnamed-chunk-3]
|
|........................ | 47%
|
|............................ | 53% [unnamed-chunk-4]
|
|............................... | 60%
|
|................................... | 67% [unnamed-chunk-5]
|
|...................................... | 73%
|
|.......................................... | 80% [unnamed-chunk-6]
|
|............................................. | 87%
|
|................................................. | 93% [unnamed-chunk-7]
|
|....................................................| 100%
[31moutput file: 02_clean.knit.md
[39m[1mpandoc [22m
to: html
output-file: 02_clean.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 02_clean
editor: visual
Output created: 02_clean.html
#move to results:
file.rename (here ("R/02_clean.html" ), here ("results/02_clean.html" ))
Augment the data
quarto:: quarto_render ("../R/03_augment.qmd" )
[31m
processing file: 03_augment.qmd
[39m
|
| | 0%
|
|.. | 5%
|
|..... | 10% [unnamed-chunk-1]
|
|....... | 14%
|
|.......... | 19% [unnamed-chunk-2]
|
|............ | 24%
|
|............... | 29% [unnamed-chunk-3]
|
|................. | 33%
|
|................... | 38% [unnamed-chunk-4]
|
|...................... | 43%
|
|........................ | 48% [unnamed-chunk-5]
|
|........................... | 52%
|
|............................. | 57% [unnamed-chunk-6]
|
|................................ | 62%
|
|.................................. | 67% [unnamed-chunk-7]
|
|.................................... | 71%
|
|....................................... | 76% [unnamed-chunk-8]
|
|......................................... | 81%
|
|............................................ | 86% [unnamed-chunk-9]
|
|.............................................. | 90%
|
|................................................. | 95% [unnamed-chunk-10]
|
|...................................................| 100%
[31moutput file: 03_augment.knit.md
[39m[1mpandoc [22m
to: html
output-file: 03_augment.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 03_augment
editor: visual
Output created: 03_augment.html
#move to results:
file.rename (here ("R/03_augment.html" ), here ("results/03_augment.html" ))
Describe the data
quarto:: quarto_render ("../R/04_describe.qmd" )
[31m
processing file: 04_describe.qmd
[39m
|
| | 0%
|
|.. | 4%
|
|.... | 9% [unnamed-chunk-1]
|
|....... | 13%
|
|......... | 17% [unnamed-chunk-2]
|
|........... | 22%
|
|............. | 26% [unnamed-chunk-3]
|
|................ | 30%
|
|.................. | 35% [unnamed-chunk-4]
|
|.................... | 39%
|
|...................... | 43% [unnamed-chunk-5]
|
|........................ | 48%
|
|........................... | 52% [unnamed-chunk-6]
|
|............................. | 57%
|
|............................... | 61% [unnamed-chunk-7]
|
|................................. | 65%
|
|................................... | 70% [unnamed-chunk-8]
|
|...................................... | 74%
|
|........................................ | 78% [unnamed-chunk-9]
|
|.......................................... | 83%
|
|............................................ | 87% [unnamed-chunk-10]
|
|............................................... | 91%
|
|................................................. | 96% [unnamed-chunk-11]
|
|...................................................| 100%
[31moutput file: 04_describe.knit.md
[39m[1mpandoc [22m
to: html
output-file: 04_describe.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 04_describe
editor: visual
Output created: 04_describe.html
#mnove to results
file.rename (here ("R/04_describe.html" ), here ("results/04_describe.html" ))
Analysis 1
quarto:: quarto_render ("../R/05_analysis_1.qmd" )
[31m
processing file: 05_analysis_1.qmd
[39m
|
| | 0%
|
|... | 7%
|
|....... | 13% [unnamed-chunk-1]
|
|.......... | 20%
|
|.............. | 27% [unnamed-chunk-2]
|
|................. | 33%
|
|..................... | 40% [unnamed-chunk-3]
|
|........................ | 47%
|
|............................ | 53% [unnamed-chunk-4]
|
|............................... | 60%
|
|................................... | 67% [unnamed-chunk-5]
|
|...................................... | 73%
|
|.......................................... | 80% [unnamed-chunk-6]
|
|............................................. | 87%
|
|................................................. | 93% [unnamed-chunk-7]
|
|....................................................| 100%
[31moutput file: 05_analysis_1.knit.md
[39m[1mpandoc [22m
to: html
output-file: 05_analysis_1.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 05_analysis_1
editor: visual
Output created: 05_analysis_1.html
#move to results:
file.rename (here ("R/05_analysis_1.html" ), here ("results/05_analysis_1.html" ))
Analysis 2 PCA
quarto:: quarto_render ("../R/06_analysis_2_PCA.qmd" )
[31m
processing file: 06_analysis_2_PCA.qmd
[39m
|
| | 0%
|
|..... | 9%
|
|......... | 18% [unnamed-chunk-1]
|
|.............. | 27%
|
|................... | 36% [unnamed-chunk-2]
|
|........................ | 45%
|
|............................ | 55% [unnamed-chunk-3]
|
|................................. | 64%
|
|...................................... | 73% [unnamed-chunk-4]
|
|........................................... | 82%
|
|............................................... | 91% [unnamed-chunk-5]
|
|....................................................| 100%
[31moutput file: 06_analysis_2_PCA.knit.md
[39m[1mpandoc [22m
to: html
output-file: 06_analysis_2_PCA.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: PCA
editor: visual
Output created: 06_analysis_2_PCA.html
file.rename (here ("R/06_analysis_2_PCA.html" ), here ("results/06_analysis_2_PCA.html" ))
Finally also render this document to the results:
files <- c ("../R/01_load.qmd" , "../R/02_clean.qmd" , "../R/03_augment.qmd" ,
"../R/04_describe.qmd" , "../R/05_analysis_1.qmd" , "../R/06_analysis_2_PCA.qmd" )
lapply (files, quarto:: quarto_render)
[31m
processing file: 01_load.qmd
[39m
|
| | 0%
|
|.......... | 20%
|
|..................... | 40% [unnamed-chunk-1]
|
|............................... | 60%
|
|.......................................... | 80% [unnamed-chunk-2][31mtrying URL 'https://archive.ics.uci.edu/static/public/383/cervical+cancer+risk+factors.zip'
[39m[31mdownloaded 99 KB
[39m
|
|....................................................| 100%
[31moutput file: 01_load.knit.md
[39m[1mpandoc [22m
to: html
output-file: 01_load.html
standalone: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 01_load
editor: visual
Output created: 01_load.html
[31m
processing file: 02_clean.qmd
[39m
|
| | 0%
|
|... | 7%
|
|....... | 13% [unnamed-chunk-1]
|
|.......... | 20%
|
|.............. | 27% [unnamed-chunk-2]
|
|................. | 33%
|
|..................... | 40% [unnamed-chunk-3]
|
|........................ | 47%
|
|............................ | 53% [unnamed-chunk-4]
|
|............................... | 60%
|
|................................... | 67% [unnamed-chunk-5]
|
|...................................... | 73%
|
|.......................................... | 80% [unnamed-chunk-6]
|
|............................................. | 87%
|
|................................................. | 93% [unnamed-chunk-7]
|
|....................................................| 100%
[31moutput file: 02_clean.knit.md
[39m[1mpandoc [22m
to: html
output-file: 02_clean.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 02_clean
editor: visual
Output created: 02_clean.html
[31m
processing file: 03_augment.qmd
[39m
|
| | 0%
|
|.. | 5%
|
|..... | 10% [unnamed-chunk-1]
|
|....... | 14%
|
|.......... | 19% [unnamed-chunk-2]
|
|............ | 24%
|
|............... | 29% [unnamed-chunk-3]
|
|................. | 33%
|
|................... | 38% [unnamed-chunk-4]
|
|...................... | 43%
|
|........................ | 48% [unnamed-chunk-5]
|
|........................... | 52%
|
|............................. | 57% [unnamed-chunk-6]
|
|................................ | 62%
|
|.................................. | 67% [unnamed-chunk-7]
|
|.................................... | 71%
|
|....................................... | 76% [unnamed-chunk-8]
|
|......................................... | 81%
|
|............................................ | 86% [unnamed-chunk-9]
|
|.............................................. | 90%
|
|................................................. | 95% [unnamed-chunk-10]
|
|...................................................| 100%
[31moutput file: 03_augment.knit.md
[39m[1mpandoc [22m
to: html
output-file: 03_augment.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 03_augment
editor: visual
Output created: 03_augment.html
[31m
processing file: 04_describe.qmd
[39m
|
| | 0%
|
|.. | 4%
|
|.... | 9% [unnamed-chunk-1]
|
|....... | 13%
|
|......... | 17% [unnamed-chunk-2]
|
|........... | 22%
|
|............. | 26% [unnamed-chunk-3]
|
|................ | 30%
|
|.................. | 35% [unnamed-chunk-4]
|
|.................... | 39%
|
|...................... | 43% [unnamed-chunk-5]
|
|........................ | 48%
|
|........................... | 52% [unnamed-chunk-6]
|
|............................. | 57%
|
|............................... | 61% [unnamed-chunk-7]
|
|................................. | 65%
|
|................................... | 70% [unnamed-chunk-8]
|
|...................................... | 74%
|
|........................................ | 78% [unnamed-chunk-9]
|
|.......................................... | 83%
|
|............................................ | 87% [unnamed-chunk-10]
|
|............................................... | 91%
|
|................................................. | 96% [unnamed-chunk-11]
|
|...................................................| 100%
[31moutput file: 04_describe.knit.md
[39m[1mpandoc [22m
to: html
output-file: 04_describe.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 04_describe
editor: visual
Output created: 04_describe.html
[31m
processing file: 05_analysis_1.qmd
[39m
|
| | 0%
|
|... | 7%
|
|....... | 13% [unnamed-chunk-1]
|
|.......... | 20%
|
|.............. | 27% [unnamed-chunk-2]
|
|................. | 33%
|
|..................... | 40% [unnamed-chunk-3]
|
|........................ | 47%
|
|............................ | 53% [unnamed-chunk-4]
|
|............................... | 60%
|
|................................... | 67% [unnamed-chunk-5]
|
|...................................... | 73%
|
|.......................................... | 80% [unnamed-chunk-6]
|
|............................................. | 87%
|
|................................................. | 93% [unnamed-chunk-7]
|
|....................................................| 100%
[31moutput file: 05_analysis_1.knit.md
[39m[1mpandoc [22m
to: html
output-file: 05_analysis_1.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: 05_analysis_1
editor: visual
Output created: 05_analysis_1.html
[31m
processing file: 06_analysis_2_PCA.qmd
[39m
|
| | 0%
|
|..... | 9%
|
|......... | 18% [unnamed-chunk-1]
|
|.............. | 27%
|
|................... | 36% [unnamed-chunk-2]
|
|........................ | 45%
|
|............................ | 55% [unnamed-chunk-3]
|
|................................. | 64%
|
|...................................... | 73% [unnamed-chunk-4]
|
|........................................... | 82%
|
|............................................... | 91% [unnamed-chunk-5]
|
|....................................................| 100%
[31moutput file: 06_analysis_2_PCA.knit.md
[39m[1mpandoc [22m
to: html
output-file: 06_analysis_2_PCA.html
standalone: true
self-contained: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
[1mmetadata[22m
document-css: false
link-citations: true
date-format: long
lang: en
title: PCA
editor: visual
Output created: 06_analysis_2_PCA.html
[[1]]
NULL
[[2]]
NULL
[[3]]
NULL
[[4]]
NULL
[[5]]
NULL
[[6]]
NULL
# Move the generated HTML file to the 'results' folder
file.rename (here ("R/00_all.html" ), here ("results/00_all.html" ))
Warning in file.rename(here("R/00_all.html"), here("results/00_all.html")):
cannot rename file '/home/people/s243903/projects/project_r4bd/R/00_all.html'
to '/home/people/s243903/projects/project_r4bd/results/00_all.html', reason 'No
such file or directory'